Las Reliquias de Tolti Aph

An interactive fiction by Graham Nelson (2005) - the Inform 7 source text

Home page

Contents
Previous
Next

Complete text
Section 1(f) - Dados de salvación (saving rolls)

Calculating saving roll modifiers of something is an activity.[1]

The to-save roll is a number that varies.

To modify to-save roll by (amount - a number) for (reason - text):
    if the amount >= 0, say ", +[amount] por [reason]";
    otherwise say ", [amount] por [reason]";
    increase the to-save roll by the amount.

For calculating saving roll modifiers of the player:
    modify to-save roll by the level of the player for "tu nivel";[2]
    continue the activity.

To decide whether a saving roll of (target - a number) by (savee - a person) to (task - a text) is made:
    say "[if savee is the player]Necesitas [otherwise][The savee] necesita [end if]obtener un dado de salvación de [target] o más usando 1d20 para [task]: ";
    change the to-save roll to a random number from 1 to 20;
    say the to-save roll;
    carry out the calculating saving roll modifiers activity with the savee;
    if the to-save roll >= target
    begin;
        say " - éxito.";
        decide yes;
    end if;
    say " - fracaso."; decide no.

To decide whether a saving roll of (target - a number) by (savee - a person) to (task - a text) is lost:[3]
    if a saving roll of target by the savee to task is made, decide no;
    decide yes.

Notes

[1]. Dados de salvación son tiradas de dados que se hacen cuando un jugador intenta algo difícil o para evitar algun peligro - he ahí lo de "salvación". Tienden a estar influenciados por el contexto del juego: si el jugador lleva algún tipo de amuleto de la suerte, está actualmente estimado con la maldición de algún semidios y así sucesivamente. Cada una de estas influencias modifican el dado: -7 por acabar de haber roto un espejo, por ejemplo. Necesitamos calcular todo esto win sabes cuales de estas influencias serán - necesitamos contruir una montura general, de hecho, vamos a dar el paso inusual de crear una "actividad". Estas normalmente manejan las labores del hogar de Inform, pero somos perfectamente libres de crear nuevas, y las reglas de W&W contienen varias.

[2]. ¿Ves qué útil es tener un jugador de alto nivel? Esto produce el texto del tipo "+3 por tu nivel" en un momento crucial.

[3]. Así podemos escribir cosas como, 'if a saving roll of 15 by the player to "nadar los rápidos" is lost'...